// 此模块封装所有跟商品相关的api。

import service from "../utils/service";
import type {ISearchPro,IGoodsList} from "@/myTypes";

// 获取商品分类
export const getCategoryApi = ()=>service({ url:"/pro/getCategory"});


// 筛选商品

export const searchProApi=(data:ISearchPro)=>service({
    url:"/pro/searchPro",
    method:"post",
    data
})

// 获取商品列表
export const getGoodsListApi=(params:IGoodsList)=>service({
    url:"/pro/list",
    params
})